package demo.ribbon;

import com.netflix.loadbalancer.ILoadBalancer;
import com.netflix.loadbalancer.RoundRobinRule;
import com.netflix.loadbalancer.Server;

import lombok.extern.slf4j.Slf4j;

@Slf4j
public class DemoRoundRobinRule extends RoundRobinRule {

	@Override
	public Server choose(ILoadBalancer lb, Object key) {
		log.info("***choose server:{}",key);
		return super.choose(lb, key);
	}

	@Override
	public Server choose(Object key) {
		log.info("***choose server:{}",key);
		return super.choose(key);
	}

}
